class Student:

    def SetName(self,name):
        self.name=name
    def PrintName(self):
        print(f"姓名: {self.name}")

stu1=Student()
stu1.SetName('李晓明')
stu1.PrintName()